/*
 * discountBO.java
 *
 * Created on March 31, 2007, 12:46 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.mystuff.printconversion;

/**
 *
 * @author Sam Griffiths
 */
public class discountBO {
    
//initialize variables
    private String dsid;
    private double percent;
    private double quantity; 
    private boolean dirty = false;   
    private boolean alreadyInDatabase = false;
    
    /** Creates a new instance of conversionBO */
    public discountBO() {
    }
        
    //creates a new instance of conversionBO
    public discountBO(String dsid) {
        this.dsid = dsid;
    }
    
    //returns conversionid
    public String getDiscountId() {
        return dsid;
    }

    //returns the id of the manager of the said store
    public double getQuantity() {
        return quantity;
    }

    //sets the manager id of the store bo
    public void setQuantity(double quantity) {
        this.quantity = quantity;
        setDirty(true);
    }

    public double getPercent(){
        return percent;
    }
    
    public void setPercent(double percent){
        this.percent = percent;
    }

    //returns store as a string
    public String toString(){
        return "Discount        : "+ this.getDiscountId()+" \n"+
               "Minimum Quantity: "+ this.getQuantity()+" \n"+
               "Percent Off     : %" + this.getPercent()+ "\n";
    }

    //returns if object has been changed since read or saved
    public boolean isDirty() {
        return dirty;
    }

    //sets dirty
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    //returns if object is already in database
    public boolean isAlreadyInDatabase() {
        return alreadyInDatabase;
    }

    //sets if object is already in database
    public void setAlreadyInDatabase(boolean alreadyInDatabase) {
        this.alreadyInDatabase = alreadyInDatabase;
    }
}

